public abstract class Animal {
    protected String name;

    public Animal(String name) {
        this.name = name;
    }

    // 进阶题要求：抽象方法 makeSound
    public abstract void makeSound();

    public void eat() {
        System.out.println(name + " is eating.");
    }

    public String getName() {
        return name;
    }
}
